import csv, sqlite3

conn = sqlite3.connect(":memory:")
curs = conn.cursor()
curs.execute("CREATE TABLE t (col1 TEXT, col2 FLOAT);")

with open('data.csv','rb') as infile:
    # csv.DictReader uses first line in file for column headings by default
    dr = csv.DictReader(infile, delimiter=',')
    to_db = [(i['col1'], i['col2']) for i in dr]

curs.executemany("INSERT INTO t (col1, col2) VALUES (?, ?);", to_db)

sqlstatement = "SELECT * from t"
curs.execute(sqlstatement)
records = curs.fetchall()
counter = 1

for rec in records:
	print rec